{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}

{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}

{%- macro relbar() %}
    <div class="related">
      <ul>
        {%- for rellink in rellinks %}
        <li class="right" {% if loop.first %}{% endif %}>
          <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
             {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
          {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
        {%- endfor %}
        {%- block rootrellink %}
        <li><a href="http://myleftstudio.com">Home</a> &raquo;</li>
        <li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
        {%- endblock %}
        {%- for parent in parents %}
          <li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
        {%- endfor %}
        {%- block relbaritems %} {% endblock %}
      </ul>
    </div>
{%- endmacro %}

{%- macro downrelbar() %}
    <div class="related">
      <ul>
        {%- for rellink in rellinks %}
        <li class="right" {% if loop.first %}{% endif %}>
          <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
             {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
          {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
        {%- endfor %}
        {%- for parent in parents %}
          <li class="right"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
        {%- endfor %}
        {%- block relbardownitems %} {% endblock %}
      </ul>
    </div>
{%- endmacro %}

{%- macro sidebar() %}
	{%- if not embedded %}{% if not theme_nosidebar|tobool %}
	<div class="col-md-3 primary-box">
		<div class="panel panel-default">
          {%- block sidebartoc %}
          {%- if display_toc %}
			<div class="panel-heading"><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></div>
			<div class="panel-body">{{ toc }}</div>
          {%- endif %}
          {%- endblock %}
          {%- block sidebarrel %}
          {%- if prev %}
			<div class="panel-heading">{{ _('Previous topic') }}</div>
            <div class="panel-body"><p class="topless"><a href="{{ prev.link|e }}" title="{{ _('previous chapter') }}">&lt; {{ prev.title }}</a></p></div>
          {%- endif %}
          {%- if next %}
			<div class="panel-heading">{{ _('Next topic') }}</div>
            <div class="panel-body"><p class="topless"><a href="{{ next.link|e }}" title="{{ _('next chapter') }}">{{ next.title }} &gt;</a></p></div>
          {%- endif %}
          {%- endblock %}
          {%- if customsidebar %}
          {% include customsidebar %}
          {%- endif %}
		</div>
	</div>
	{%- endif %}{% endif %}
{%- endmacro %}

<html lang="en">
<head>
    {% if sourcename == "error.txt" %}
    <base href="http://myleftstudio.com/">
    {% endif %}
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    {{ metatags }}
    {%- if not embedded and docstitle %}
      {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
    {%- else %}
      {%- set titlesuffix = "" %}
    {%- endif %}
    <title>{{ title|striptags }}{{ titlesuffix }}</title>
    <meta name="keywords" content="php, phalcon, phalcon7, phalcon php, php framework, faster php framework">
    <link rel="stylesheet" type="text/css" href="{{ pathto('static/bootstrap.min.css', 1) }}" />
    <link rel="stylesheet" type="text/css" href="{{ pathto('static/phalcon.css', 1) }}" />

    {%- if not embedded %}
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '{{ url_root }}',
        VERSION:     '{{ release|e }}',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '{{ file_suffix }}',
        HAS_SOURCE:  {{ has_source|lower }}
      };
    </script>

    <script src="{{ pathto('static/jquery.min.js', 1) }}"></script>

    {%- if use_opensearch %}
    <link rel="search" type="application/opensearchdescription+xml"
          title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
          href="{{ pathto('static/opensearch.xml', 1) }}"/>
    {%- endif %}
    <link rel="shortcut icon" href="{{ pathto('static/img/favicon.ico', 1) }}"/>
    {%- endif %}
{%- block linktags %}
    {%- if hasdoc('about') %}
    <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
    {%- endif %}
    {%- if hasdoc('genindex') %}
    <link rel="index" title="{{ _('Index') }}" href="{{ pathto('index') }}" />
    {%- endif %}
    {%- if hasdoc('search') %}
    <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
    {%- endif %}
    {%- if hasdoc('copyright') %}
    <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
    {%- endif %}
    <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
    {%- if parents %}
    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
    {%- endif %}
    {%- if next %}
    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
    {%- endif %}
    {%- if prev %}
    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
    {%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
<body>

<header class="page-header">
<nav class="navbar" role="navigation">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-container">
				<span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
			</button>
			<a class="navbar-brand phalcon-logo" href="/"><span itemprop="name" class="sr-only">Phalcon PHP</span></a>
		</div>

		<div class="collapse navbar-collapse navbar-right" id="main-menu-container">
			<ul class="nav navbar-nav main-menu">
			  <li class="first"><a href="https://github.com/dreamsxin/cphalcon7" class="header-nav-link">GitHub</a></li>
			  <li class="first"><a href="https://github.com/dreamsxin/cphalcon7/releases" class="header-nav-link">Download</a></li>
			  <li class="first"><a href="/api/" class="header-nav-link">API</a></li>
			  <li class="first"><a href="/internals/" class="header-nav-link">内核开发手册</a></li>
			</ul>
		</div>
	</div>
</nav>
</header>

<div class="heading">
    <div class="container">
        <div class="row">
            <h2>Documentation</h2>
        </div>
    </div>
</div>


<div class="container-fluid">
{%- block header %}{% endblock %}

{%- block relbar1 %}{{ relbar() }}{% endblock %}

{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
</div>

<div class="container-fluid">
  {%- block sidebar2 %}{{ sidebar() }}{% endblock %}
  <div class="col-md-9 second-box" valign="top">
	<div class="document">
	{%- block document %}
		<div class="documentwrapper">
		{%- if not embedded %}{% if not theme_nosidebar|tobool %}
		  <div class="bodywrapper">
		{%- endif %}{% endif %}
			<div class="body" {% if theme_nosidebar|tobool %}style="margin: auto;"{% endif %}>
			  {% block body %} {% endblock %}
			</div>
		{%- if not embedded %}{% if not theme_nosidebar|tobool %}
		  </div>
		{%- endif %}{% endif %}
		</div>
	{%- endblock %}
	</div>
  </div>
</div>

{%- block relbar2 %}{{ downrelbar() }}{% endblock %}

{%- block footer %}

<footer class="footer">
	<div class="container">
      <div class="row">
          <div class="col-xs-6 col-sm-3">
              <h4>Download</h4>
              <ul>
                  <li><a href="https://github.com/dreamsxin/cphalcon7/releases">安裝 Phalcon7</a></li>
              </ul>
          </div>
          <div class="col-xs-6 col-sm-3">
              <h4>Community</h4>
              <ul>
                  <li><a href="https://github.com/dreamsxin/cphalcon7">GitHub</a></li>
                  <li><a href="https://github.com/dreamsxin/cphalcon7/issues">Issue Tracker</a></li>
              </ul>
          </div>
          <div class="col-xs-6 col-sm-2">
              <h4>About</h4>
              <ul>
                  <li><a href="https://github.com/dreamsxin/cphalcon/wiki/%E6%8D%90%E8%B5%A0%EF%BC%88Donation%EF%BC%89">Donate</a></li>
              </ul>
          </div>
          <div id="license-spaccer" class="visible-xs"></div>
          <div id="license-wrapper" class="col-xs-12 col-sm-4">
              <p class="license">

                  Phalcon7 Framework is released under the <a href="https://github.com/dreamsxin/cphalcon7/blob/master/docs/LICENSE.md">new BSD license</a>.<br>
                  Except where otherwise noted, content on this site is licensed under the
                  <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License.</a>
              </p>
              <div class="design">
                  <span>Designed by:</span>

                  <a href="http://www.fog-city.net/" class="fogcity" target="_blank" title="Fog City Software"><span>Fog City Software</span></a>
              </div>
          </div>
      </div>
	</div>
</footer>

{%- endblock %}
</body>
</html>
